package com.um.pasantiaum.empresa.pedidos;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.um.pasantiaum.R;
import com.um.pasantiaum.objetos.Pedido;
import com.um.pasantiaum.objetos.SelectedPedido;

public class DetailPedidoHistoryActivity extends Activity {
	
	public static final String SELECTED_PEDIDO = "SELECTED_PEDIDO";
	private Pedido selectedOrder;
	private TextView mDate, mUserName, mProducts, mTotal;
	private Button mAceptar, mRechazar, mVerCamion;
	
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		
		setContentView(R.layout.activity_detail_pedido);
		selectedOrder = SelectedPedido.getSelectedPedido().getPedido();
		
		
		mDate = (TextView) findViewById(R.id.producto_date_detail);
		mDate.setText(selectedOrder.getDateCreated().toString());
		
		mUserName = (TextView) findViewById(R.id.prodructo_nombre_detail);
		mUserName.setText(selectedOrder.getCliente().getName());
		
		mProducts = (TextView) findViewById(R.id.producto_descripcion_detail);
		mProducts.setText(selectedOrder.getProductos());
		
		mTotal = (TextView) findViewById(R.id.producto_precio_detail);
		mTotal.setText("$ " + String.valueOf(selectedOrder.getPrecioTotal()));
		
		mAceptar = (Button) findViewById(R.id.aceptar_button_detail);
		mRechazar = (Button) findViewById(R.id.rechazar_button_detail);
		mVerCamion = (Button) findViewById(R.id.ver_camion_button_detail);
		
		mAceptar.setVisibility(View.INVISIBLE);
		mRechazar.setVisibility(View.INVISIBLE);
		mVerCamion.setVisibility(View.INVISIBLE);
		
		
	}

}
